package srjava.messages;

import java.io.IOException;
import java.io.StringReader;

public class TaskCheckMsg extends Message {
	int taskId;
	
	public TaskCheckMsg() {
		this.msgType = MessageType.TASK_CHECK_MSG;
		this.taskId = -1;
	}

	public TaskCheckMsg(int taskId) {
		this.msgType = MessageType.TASK_CHECK_MSG;
		this.taskId = taskId;
	}

	public int getTaskId() {
		return taskId;
	}

	public void setTaskId(int taskId) {
		this.taskId = taskId;
	}

	@Override
	public String serialize() {
		String pom = super.serialize() + taskId + " ";
		return pom;
	}

	@Override
	public void deSerialize(StringReader s) throws IOException {
		//super.deSerialize(s);
		taskId = IntString.parseInt(s);
	}

}
